# 该镜像需要依赖的基础镜像
FROM openjdk:8-jre

# 将当前目录下的jar包复制到docker容器的/目录下
ADD ./target/demo-0.0.1-SNAPSHOT.jar /home/repository/demo-0.0.1-SNAPSHOT.jar
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone

EXPOSE 19333
# 指定docker容器启动时运行jar包
ENTRYPOINT ["java" ,"-server","-XX:InitialHeapSize=100m","-XX:MaxHeapSize=100m","-XX:-UseGCOverheadLimit","-XX:+HeapDumpOnOutOfMemoryError","-Dsun.misc.URLClassPath.disableJarChecking=true","-Djava.net.preferIPv4Stack=true","-Duser.timezone=GMT+8","-Dclient.encoding.override=UTF-8","-Dfile.encoding=UTF-8","-Djava.security.egd=file:/dev/./urandom", "-jar", "/home/repository/demo-0.0.1-SNAPSHOT.jar" , ">/dev/null" , "2>&1"]
# 指定维护者的名字
MAINTAINER leizi
